Using cURL with Spatial Studio REST APIs | 您所在的位置:网站首页 › libcurl header › Using cURL with Spatial Studio REST APIs |
cURL is a powerful command line tool available on many platforms for sending and receiving URL requests to a remote server. When accessing or invoking a REST endpoint, the curl command follows a specific format. For example, consider the following request to retrieve the Spatial Studio version: HTTP GET Requestcurl -k https://localhost:4040/spatialstudio/oauth/v1/softwareVersion \ --header "Authorization: Bearer "The options used in the preceding request are explained as follows: -k: To indicate that the cURL request must accept the self-signed SSL certificate used by a Quick Start Spatial Studio instance. –-header: To set the Spatial Studio access token as a bearer token header in the request.Note that the keywords Authorization: (including the colon and whitespace) and Bearer must be entered as is, with the entire value for the -- header option enclosed in double quotes. The variable represents the actual token string which must be provided in one unbroken line. Note that the URL in the request uses oauth/v1 as path segments. If you accidentally use api/v1, then the response returns the web application login page in HTML. The following sections explain with a few examples on how to invoke a REST API endpoint using cURL: |
CopyRight 2018-2019 实验室设备网 版权所有 |